from tools.express.com import *


fun_dict = dict()

# 是否开启日志
log = {'open': False}

# 功能介绍：
# 伪代码中的注释符为 -
# 如果一个功能需要传入多个参数,则参数用括号括起来，如：功能名 (参数1,参数2,参数3...)


# 公共函数
fun_dict['读取文件'] = read_file
fun_dict['暂停'] = sleep
fun_dict['打开日志'] = open_log
fun_dict['关闭日志'] = close_log

# 是否开启爬虫
open_spider = True

if open_spider:
    from tools.express import spider as sp
    fun_dict['爬取'] = sp.build_spider
    fun_dict['偷偷爬取'] = sp.build_hidden_spider
    fun_dict['点击'] = sp.click_ele
    fun_dict['输入'] = sp.input_ele
    fun_dict['导出'] = sp.output_table_to_json
    fun_dict['关闭浏览器'] = sp.close
    fun_dict['标题'] = sp.print_title
    fun_dict['看页面'] = sp.switch_page




